package com.imooc.account;

import com.imooc.account.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

/**
 * @program: sping
 * @description: Sping的声明式事务管理的方式二：基于AspectJ的XML方式的配置.
 * @author: jason.jia
 * @create: 2018-07-03 19:24
 **/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext2.xml")
public class AccountTest2 {
    //测试业务层类：
    @Resource(name="accountService")
    private AccountService accountService;
    @Test
    public void testAccount(){
        accountService.transfer("aaa", "bbb", 200d);
    }
}
